<!DOCTYPE html>
<html lang="en" th:insert="~{layout/base :: layout(~{::main},'archive')}" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:fragment="main" class="container mx-auto xl:w-4/5 my-4 flex flex-row items-start gap-2 ">

    <div class="left w-1/5 bg-gray-300 p-2" th:insert="~{blog/sidebar :: sidebar}"></div>

    <div class="right w-4/5">
        <div th:each="year : ${sidebar_archives}">
            <a th:href="@{/blog/archive(created=${year.date})}" class="text-3xl" th:text="${year.date}"></a>
            <div class="pl-2" th:each="month : ${year.months}">
                <a th:href="@{/blog/archive(created=${month.date})}" class="text-2xl" th:text="${month.date}"></a>
                <div class="pl-2" th:each="day : ${month.days}">
                    <a th:href="@{/blog/archive(created=${day.date})}" class="text-lg" th:text="${day.date}"></a>
                    <div class="pl-4" th:each="article : ${day.articles}">
                        <a class="text-emerald-600 hover:text-emerald-700"
                           th:href="@{/blog/{title}(title=${article.title})}" th:title="${article.title}"
                           th:text="${article.title}"></a>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
</body>
</html>